# for a in range(2,101):
#     active = True
#     for b in range(2,a//2):
#         if a%b == 0:
#             active = False
#             break
#     if active ==True:
#         print(a)

# students_num = input("请输入学生人数：")
# print(f"The class has {students_num} students")

# dirty_date = "24^98.14_2113214"
# date_replaced = dirty_date.replace("^","")
# date_replaced = date_replaced.replace("_","")
# print(f"{float(date_replaced):.5f}")

# for number in range(1, 21):
#     print(number)

# numbers = list(range(1, 1000001))
# for number in numbers:
#     print(number)

# numbers = list(range(1, 1000001))
# print(f"最小值: {min(numbers)}")
# print(f"最大值: {max(numbers)}")
# print(f"求和结果: {sum(numbers)}")

# odd_numbers = list(range(1, 21, 2))
# for number in odd_numbers:
#     print(number)

# multiples_of_three = list(range(3, 31, 3))
# for number in multiples_of_three:
#     print(number)


# my_list = [1, 2, 3, 4, 5,6, 7]
# print("The first three items in the list are:")
# print(my_list[:3])
# print("Three items from the middle of the list are:")
# print(my_list[2:5])
# print("The last three items in the list are:")
# print(my_list[-3:])


# my_pizzas = ['Margherita', 'Pepperoni', 'Hawaiian']
# friend_pizzas = my_pizzas[:]
# my_pizzas.append('Vegetarian')
# friend_pizzas.append('Meat Lovers')
# print("My favorite pizzas are:")
# for pizza in my_pizzas:
#     print(pizza)
# print("\nMy friend's favorite pizzas are:")
# for pizza in friend_pizzas:
#     print(pizza)


# my_foods = ['pizza', 'noodle', 'cake']
# friend_foods = my_foods[:]
# my_foods.append('cannoli')
# friend_foods.append('ice cream')
# print("My favorite foods are:")
# for food in my_foods:
#     print(food)

# print("\nMy friend's favorite foods are:")
# for food in friend_foods:
#     print(food)



# names = ["Alice", "Bob", "Charlie", "Diana"]
# for name in names:
#     print(name)


# names = ["Alice", "Bob", "Charlie", "Diana"]
# for name in names:
#     print(f"Hello, {name}! How are you today?")


# commute_methods = ["motorcycle", "car", "bicycle"]
# for method in commute_methods:
#     print(f"I would like to own a Honda {method}.")


# guests = ["Albert Einstein", "Marie Curie", "Leonardo da Vinci"]
# for guest in guests:
#     print(f"Dear {guest}, I would like to invite you to dinner.")

# unavailable_guest = "Marie Curie"
# new_guest = "Isaac Newton"

# print(f"{unavailable_guest} can't make it to the dinner.")


# guests[guests.index(unavailable_guest)] = new_guest
# for guest in guests:
#     print(f"Dear {guest}, I would like to invite you to dinner.")

# print("I found a bigger dinner table!")


# guests.insert(0, "Nikola Tesla")  
# guests.insert(2, "Ada Lovelace")  
# guests.append("Stephen Hawking") 

# for guest in guests:
#     print(f"Dear {guest}, I would like to invite you to dinner.")

# print("I can only invite two people for dinner.")

# while len(guests) > 2:
#     removed_guest = guests.pop()
#     print(f"Sorry, {removed_guest}, I can't invite you to dinner.")

# for guest in guests:
#     print(f"Dear {guest}, you are still invited to dinner.")

# del guests[:]
# print("The guest list is now empty:", guests)



# places = ["Paris", "Tokyo", "New York", "Sydney", "Rome"]
# print("Original list:", places)

# print("Sorted list:", sorted(places))

# print("Original list after sorted():", places)

# print("Sorted list in reverse order:", sorted(places, reverse=True))

# print("Original list after sorted() reverse:", places)

# places.reverse()
# print("List after reverse():", places)

# places.reverse()
# print("List after reverse() again:", places)

# places.sort()
# print("List after sort():", places)

# places.sort(reverse=True)
# print("List after sort() reverse:", places)


# guests = ["Albert Einstein", "Isaac Newton", "Nikola Tesla"]
# print(f"I am inviting {len(guests)} guests to dinner.")


# elements = ["Mount Everest", "Amazon River", "France", "Tokyo", "Python", "Jazz"]

# print("Original list:", elements)

# elements.append("Sahara Desert")
# print("List after append():", elements)

# elements.insert(2, "Great Wall")
# print("List after insert():", elements)

# elements.remove("Python")
# print("List after remove():", elements)

# last_element = elements.pop()
# print("List after pop():", elements)
# print("Popped element:", last_element)

# elements.sort()
# print("List after sort():", elements)

# elements.reverse()
# print("List after reverse():", elements)

# print("Length of the list:", len(elements))



# pizzas = ["Pepperoni", "Margherita", "Hawaiian"]
# for pizza in pizzas:
#     print(f"I like {pizza} pizza.")

# print("I really love pizza!")


# animals = ["Dog", "Cat", "Rabbit"]

# for animal in animals:
#     print(f"A {animal} would make a great pet.")

# print("Any of these animals would make a great pet!")